#ifndef _OC_GribWrapper_H__
#define _OC_GribWrapper_H__

#include "GribDefine.h"
#include "OCVolume/VolumeObject.h"
#include "OCVolume/VolumeOptions.h"
#include "OCMain/DataStream.h"
#include "GribSyncFile.h"
#include "GribOutput.h"
#include "json/json.h"

namespace OCPP
{
	class _GribExport GribWrapper
	{
	public:
		GribWrapper();
		~GribWrapper();

		bool open(String fileName);
		void close();
		void print();
		void extract(String varName, int levelIndex, int timeIndex, const VolumeOptions& options);
		GribReadIndexList read(String varName, int levelIndex, int timeIndex, const VolumeOptions& options);
		GribOutput getData(const GribReadIndex& index, const VolumeOptions& options);
		Json::Value getVars();

		GribVariablePtr findVariable(String name);
	private:
		String _filName;
		GribSyncFilePtr _NcSyncFile;
	};
}


#endif // !_OC_GribReader_H__
